/**
 * 列表上每项的布局
 */

import React, {Component} from 'react';
import {
  Image,
  Platform, 
  StyleSheet,
  Text,
  View,
  TouchableOpacity
} from 'react-native';
import BaseStyle from "../styles/baseStyle"
import {Size} from "../constStr.js"
import Icon from "../components/react-native-iconfont/IconFont.js"

import {Header,Container,ListItem,List,Left,Body,Thumbnail} from "native-base";

export default class JobItem extends Component {

  render(){
  	return null;
  }
  renderRow(rowData) {
    return(<ListItem  style={{backgroundColor:"#fff",marginBottom:8,marginLeft:0,padding:0,paddingHorizontal:5}}>
              <Left>
                <Thumbnail square source={{ uri:rowData.picture}} style={{height:110,width:110,borderRadius:5}}/>
              </Left>
              <Body style={{flex:1,borderColor:"transparent",paddingTop:10,paddingBottom:10}}>
                <Text numberOfLines={2}>{rowData.title||""}</Text>
                <View style={[BaseStyle.horizontal,{marginVertical:5}]}>
                	<View style={{backgroundColor:"#EE4000",borderRadius:8,paddingHorizontal:2,marginRight:5}}>
                		<Text style={{fontSize:Size(10),color:"#fff"}}>{rowData.shoptype==2?"天猫":"淘宝"}</Text>
                	</View>
                	<Text numberOfLines={2} style={{fontSize:Size(12),color:"#888",flex:1,}}>{rowData.shop_name||""}</Text>
                </View>
                 <View style={[BaseStyle.horizontal,{marginVertical:5}]}>
                	<Text style={{fontSize:Size(16),color:"#CD3700"}}>￥{rowData.voucher_price}</Text>
                	<Text style={{fontSize:Size(10),color:"#888",marginLeft:10}}>{rowData.price||""}</Text>
                	<Text style={{fontSize:Size(10),color:"#888",marginLeft:10}}>销量:{rowData.coupon_num||0}</Text>
                </View>
                 <View style={[BaseStyle.horizontal,{marginTop:5}]}>
                	<View style={{borderColor:"#EE4000",borderWidth:1,borderRadius:2}}>
                		<Text style={{fontSize:Size(10),color:"#EE4000"}}>券：￥{rowData.coupon_price||"0.00"}</Text>
                	</View>
                	<View style={{borderColor:"#EE4000",borderWidth:1,borderRadius:2,marginLeft:10}}>
                		<Text style={{fontSize:Size(10),color:"#EE4000"}}>佣金：￥{rowData.commission||"0"}</Text>
                	</View>
                </View>
              </Body>
            </ListItem>)
  }
  renderGridRow(){
    
  }
}

const styles = StyleSheet.create({

});